// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

// i-view 组件
import iView from 'iview';
import 'iview/dist/styles/iview.css';
Vue.use(iView);

//引入请求插件axios
import axios from './Api/http';

Vue.config.productionTip = false

//引入qs全局使用
import qs from 'qs';
Vue.prototype.$qs = qs;

//引入vue-cookie
import VueCookie from 'vue-cookie';
Vue.use(VueCookie);
//引入jquery
import $ from 'jquery'
import 'bootstrap/dist/css/bootstrap.min.css'
import 'bootstrap/dist/js/bootstrap.min'

//引入less less-loader
/*require('!style-loader!css-loader!less-loader!./common/less/index.less')*/

//分隔符
//let delimiters=['{{','}}']
//let usesafeDelimiters=['{{{','}}}']
//Vue.config.delimiters = ["<%","%>"]
/* eslint-disable no-new */
//重写router
/*let router = new VueRouter({
  mode: 'history',
  routes: [
    {
      path: '/',
      component: HelloWorld
    },
    {
      path: '/index',
      component: Index
    }/!*,
    {
      path: '/detail',
      component: DetailPage,
      redirect: '/detail/analysis',
      children: [
        {
          path: 'analysis',
          component: DetailAnaPage
        },
        {
          path: 'count',
          component: DetailCouPage
        },
        {
          path: 'forecast',
          component: DetailForPage
        },
        {
          path: 'publish',
          component: DetailPubPage
        }
      ]
    }*!/
  ]
})*/

/*const routes=[
  {
    path:'/',
    components: App
  },
  {
    path:'/index',
    components:Index
  }
]
const routers={
  routes
}*/

/*router.beforeEach((to,from,next)=>{
  if(to.meta.requireAuth){
      if(store.state.token){

      }
  }else{
    next({
      path: '/',
      query: {redirect: to.fullPath}  // 将跳转的路由path作为参数，登录成功后跳转到该路由
    })
  }
})*/


new Vue({
  el: '#app',
  router,
  //routers,
  //render:h =>  h(App)
  components: { App },
  template: '<App/>'
})
